package com.ai.util;

import cn.hutool.core.util.StrUtil;
import com.ai.common.CommonResponse;
import com.ai.common.constant.enumP.CameraDetectStatus;
import com.ai.entity.made.CameraFlowCollectionPlatform;
import com.ai.service.made.ICameraFlowCollectionPlatformService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * @Author jiaok
 * @Date 2024-12-10 10:24
 */
@Slf4j
@Component
public class GetCameraInfoHk {


    @Resource
    private ICameraFlowCollectionPlatformService iCameraFlowCollectionPlatformService;


    /**
     * 获取摄像头信息
     * @param platformId 取流平台id
     * @param cameraName 摄像头名称
     * @return 摄像头信息列表
     */
    public  List<HashMap<String,String>> getCameraInfo(Integer platformId,String cameraName){

        List<HashMap<String, String>> res = new LinkedList<>();

        CameraFlowCollectionPlatform platform = iCameraFlowCollectionPlatformService.getById(platformId);
        String urlJson = sendToPlatGetCameraInfoPage(platform,cameraName);

        res = analysisStrJson(urlJson);
//        JSONObject jsonObject = JSONObject.parseObject(urlJson);
//        JSONObject dataObject = jsonObject.getJSONObject("data");
//        JSONArray listArray = dataObject.getJSONArray("list");
//
//        for (int i = 0; i < listArray.size(); i++) {
//
//            JSONObject item = listArray.getJSONObject(i);
//            HashMap<String, String> map = new HashMap<>();
//            map.put("name",item.getString("name"));
//            map.put("indexCode",item.getString("indexCode"));
//            res.add(map);
//        }

        return res;
    }


    /**
     * 从指定平台获取摄像头的在线状态
     * @param platformId 平台id
     * @param cameraIndexCode 摄像头code
     * @return list《（code，status）》  1 在线 ； 0 离线； -1 未检测
     */
    public  Map<String,Integer> getCameraStatusMap(Integer platformId,List<String> cameraIndexCode){

        HashMap<String, Integer> res = new HashMap<>(16);

        CameraFlowCollectionPlatform platform = iCameraFlowCollectionPlatformService.getById(platformId);

        String platUrlJson = sendToPlatGetCameraStatusList(platform,cameraIndexCode);

        JSONObject jsonObject = JSONObject.parseObject(platUrlJson);
        JSONObject data = jsonObject.getJSONObject("data");
        JSONArray list = data.getJSONArray("list");

        for (int i = 0; i < list.size(); i++) {
            JSONObject item = list.getJSONObject(i);
            String indexCode = item.getString("indexCode");
            try {
                Integer online = item.getInteger("online");
                res.put(indexCode,online);
            }catch (Exception e){
                log.error("===========================  获取设备状态异常:{}  ===========================",e.getMessage());
                e.printStackTrace();
                res.put(indexCode, CameraDetectStatus.NOT_DETECTED.getCode());
            }
        }

        return res;
    }




    public  String getCameraInfoStr1(Integer platformId,String cameraName){

        LinkedList<Map<String, String>> res = new LinkedList<>();
        CameraFlowCollectionPlatform platform = iCameraFlowCollectionPlatformService.getById(platformId);
        String url = "/api/resource/v2/camera/search";
        String type = "";
        String urlJson = sendToPlatGetCameraInfoPage(platform,cameraName,url,type);
        return urlJson;
    }

    public  String getCameraInfoStr2(Integer platformId,String cameraName){

        LinkedList<Map<String, String>> res = new LinkedList<>();
        CameraFlowCollectionPlatform platform = iCameraFlowCollectionPlatformService.getById(platformId);
        String url = "/api/irds/v2/deviceResource/resources";
        String type = "camera";
        String urlJson = sendToPlatGetCameraInfoPage(platform,"",url,type);
        return urlJson;
    }


    /**
     * 批量获取摄像头在线状态信息
     * @param platform 平台信息
     * @param cameraIndexCodes 摄像头codes
     * @return 平台结果
     */
    private  String sendToPlatGetCameraStatusList(CameraFlowCollectionPlatform platform,List<String> cameraIndexCodes) {
        // 设置平台参数 平台的ip端口
        ArtemisConfig.host = platform.getHost()+":"+platform.getPort();
        // 设置平台参数 密钥appkey
        ArtemisConfig.appKey = platform.getAppKey();
        // 设置平台参数 密钥appSecret
        ArtemisConfig.appSecret = platform.getAppSecret();

        /**
         * STEP2：设置OpenAPI接口的上下文
         */
        final String ARTEMIS_PATH = "/artemis";

        /**
         * STEP3：设置接口的URI地址
         */

        final String previewURLsApi = ARTEMIS_PATH +"/api/nms/v1/online/camera/get";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                log.info("=========================== 访问平台取流接口：{}  ===========================",previewURLsApi);
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };
        /**
         * STEP4：设置参数提交方式
         */
        String contentType = "application/json";
        /**
         * STEP5：组装请求参数
         */
        JSONObject jsonBody = new JSONObject();
        jsonBody.put("indexCodes",cameraIndexCodes );

        String body = jsonBody.toJSONString();

        /**
         * STEP6：调用接口
         */
        log.info("===========================  获取摄像头状态接口入参：{}  ===========================",body);
        // post请求application/json类型参数
        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType , null);
        log.info("===========================  摄像头状态接口返回：{}   ===========================",result);
        return result;

    }



    /**
     * 根据摄像头名称从平台获取摄像头信息列表
     * @param platform  取流平台信息
     * @param cameraName 摄像头名称
     * @param url 获取摄像头信息接口地址
     * @param type 获取资源类型 camera
     * @return 摄像头信息
     */
    private  String sendToPlatGetCameraInfoPage(CameraFlowCollectionPlatform platform, String cameraName,String url,String type) {

        // 设置平台参数 平台的ip端口
        ArtemisConfig.host = platform.getHost()+":"+platform.getPort();
        // 设置平台参数 密钥appkey
        ArtemisConfig.appKey = platform.getAppKey();
        // 设置平台参数 密钥appSecret
        ArtemisConfig.appSecret = platform.getAppSecret();

        /**
         * STEP2：设置OpenAPI接口的上下文
         */
        final String ARTEMIS_PATH = "/artemis";

        /**
         * STEP3：设置接口的URI地址
         * 淮南煤矿
         */

        final String previewURLsApi = ARTEMIS_PATH + url;
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                log.info("=========================== 访问平台取流接口：{}  ===========================",previewURLsApi);
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        /**
         * STEP4：设置参数提交方式
         */
        String contentType = "application/json";

        /**
         * STEP5：组装请求参数
         */
        JSONObject jsonBody = new JSONObject();
        if (StrUtil.isNotBlank(cameraName)){
            jsonBody.put("name", cameraName);
        }
        if (StrUtil.isNotBlank(type)){
            jsonBody.put("resourceType",type);

        }
        jsonBody.put("pageNo", 1);
        jsonBody.put("pageSize", 1000);
        String body = jsonBody.toJSONString();
        /**
         * STEP6：调用接口
         */
        log.info("===========================  调用摄像头平台入参：{}  ===========================",body);
        // post请求application/json类型参数
        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType , null);
        return result;
    }


    /**
     * 根据摄像头名称从平台获取摄像头信息列表
     * @param cameraName 摄像头名称
     * @return 摄像头信息
     */
    private  String sendToPlatGetCameraInfoPage(CameraFlowCollectionPlatform platform, String cameraName) {

        // 设置平台参数 平台的ip端口
        ArtemisConfig.host = platform.getHost()+":"+platform.getPort();
        // 设置平台参数 密钥appkey
        ArtemisConfig.appKey = platform.getAppKey();
        // 设置平台参数 密钥appSecret
        ArtemisConfig.appSecret = platform.getAppSecret();

        /**
         * STEP2：设置OpenAPI接口的上下文
         */
        final String ARTEMIS_PATH = "/artemis";

        /**
         * STEP3：设置接口的URI地址
         * 淮南煤矿
         */

        final String previewURLsApi = ARTEMIS_PATH + "/api/resource/v2/camera/search";
        Map<String, String> path = new HashMap<String, String>(2) {
            {
                log.info("=========================== 访问平台取流接口：{}  ===========================",previewURLsApi);
                put("https://", previewURLsApi);//根据现场环境部署确认是http还是https
            }
        };

        /**
         * STEP4：设置参数提交方式
         */
        String contentType = "application/json";

        /**
         * STEP5：组装请求参数
         */
        JSONObject jsonBody = new JSONObject();
        jsonBody.put("name", cameraName);
        jsonBody.put("pageNo", 1);
        jsonBody.put("pageSize", 1000);
        String body = jsonBody.toJSONString();
        /**
         * STEP6：调用接口
         */
        log.info("===========================  调用摄像头平台入参：{}  ===========================",body);
        // post请求application/json类型参数
        String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, contentType , null);
        return result;
    }



    /**
     * 解析海康平台返回的摄像头信息
     * @param urlJson
     * @return
     */
    public static List<HashMap<String, String>> analysisStrJson(String urlJson){
        List<HashMap<String, String>> res = new LinkedList<>();
       try {
           JSONObject jsonObject = JSON.parseObject(urlJson);

//        JSONArray dataArray = jsonObject.getJSONArray("data");
//        List<JSONObject> dataList = dataArray.toJavaList(JSONObject.class);
           JSONObject dataObject = jsonObject.getJSONObject("data");
           List<JSONObject> dataList = dataObject.getJSONArray("list").toJavaList(JSONObject.class);


           // 遍历输出每个对象
           for (JSONObject data : dataList) {
               HashMap<String, String> hashMap = new HashMap<>(16);

               String name = data.getString("name");
               String indexCode = data.getString("indexCode");

               hashMap.put("name",name);
               hashMap.put("indexCode",indexCode);
               res.add(hashMap);
           }
       }catch (Exception e){
           log.error("平台获取摄像头信息出现异常,{}",e.getMessage());
       }
        return res;
    }

    /**
     * 供前端本地测试接口
     * @param valueOf
     * @param name
     * @return 返回现场模拟数据
     */
    public CommonResponse getCameraInfoFromPlat(Integer valueOf, String name) {
        String json = "{\"code\":200,\"msg\":\"SUCCESS\",\"data\":[{\"name\":\"新集二矿-运输区-副井上口南门车场\",\"indexCode\":\"8e69a54317c64bdeaccd03fb8155b436\"},{\"name\":\"新集二矿-固定队-副井车房\",\"indexCode\":\"3ad77e24faad405aab02f39e2913c989\"},{\"name\":\"新集二矿-固定队-主井滚筒\",\"indexCode\":\"d3954977d2074d33971e054bd4713eab\"},{\"name\":\"主井上口\",\"indexCode\":\"ff4a62313d554d9397002d20e53c1fc2\"},{\"name\":\"新集二矿-固定队-主井电控室\",\"indexCode\":\"e81af9d8d62845ba9aaf45cc4315753e\"},{\"name\":\"新集二矿-固定队-主井低压室\",\"indexCode\":\"a8a5b3628d424811aee11c9e5b863001\"},{\"name\":\"新集二矿-固定队-主井整流变压器\",\"indexCode\":\"00d176747b7743caa0cf72e12bc5a3bf\"},{\"name\":\"新集二矿-固定队-主井操作室\",\"indexCode\":\"81fae56032014250bf4b22b9968b8f75\"},{\"name\":\"新集二矿-固定队-主井高压室\",\"indexCode\":\"0e22bed804014a028463d5b714e2cb9b\"},{\"name\":\"副井一楼传动柜\",\"indexCode\":\"5ae0e881a1c4416caa9533da12802a39\"},{\"name\":\"新集二矿-固定队-副井一楼入口\",\"indexCode\":\"3b81fee40be94dcf96dc6c0e30ac0f80\"},{\"name\":\"新集二矿-固定队-主井卸载\",\"indexCode\":\"54293e2a13c443488acd539acf5c0994\"},{\"name\":\"新集二矿-固定队-副井尾绳悬挂\",\"indexCode\":\"9efedf0c24274ca8854684b6ef30e862\"},{\"name\":\"运输区-井口大厅西北角\",\"indexCode\":\"e52a04abb6fb4b83890b9a5373c2f255\"},{\"name\":\"运输区-井口大厅西墙向东\",\"indexCode\":\"a707d4140a1848eea71f4d1281257a24\"},{\"name\":\"主井煤仓上口皮带头\",\"indexCode\":\"5d7e320753ac45ce8e5d604a9a53e4a4\"},{\"name\":\"新集二矿-副井楼顶向北车场\",\"indexCode\":\"df5125b6ec9c482ba611c9483850a502\"},{\"name\":\"主井煤仓上口皮带头\",\"indexCode\":\"51f01a6a8cfb414bac08399336f9468e\"},{\"name\":\"固定队-副井北门分析视频\",\"indexCode\":\"c777e796621047ed827c622b3baca0c0\"},{\"name\":\"副井上口南门\",\"indexCode\":\"deba2e61992742d180c3db1a5c369733\"},{\"name\":\"运输区-副井下口南门\",\"indexCode\":\"e6250a540489416faeffba4a6efc944d\"},{\"name\":\"新集二矿-运输区-副井下口二平台\",\"indexCode\":\"53ce7363e01c407c8d06149aa46f8651\"},{\"name\":\"固定队-550水平井下中央水泵房2\",\"indexCode\":\"646167d38c0c4a9d93a5cf7d8c2e5eae\"},{\"name\":\"固定队-副井尾绳环\",\"indexCode\":\"57113238e45344afaa213efdf74adaa8\"},{\"name\":\"新集二矿-固定队-副井滚筒\",\"indexCode\":\"527f514f362343c38bac1ef020502206\"},{\"name\":\"新集二矿-主井架矿区全景(球机)\",\"indexCode\":\"a5d3b0ab9f5c43038c2d3020937dff37\"},{\"name\":\"固定队-主井下口装载皮带头\",\"indexCode\":\"e138ed452e7b4444b34bc5ada19016f4\"},{\"name\":\"固定队-主井下口装载皮带尾\",\"indexCode\":\"e8d24a8be7cd42a4b6533cd3c70108dd\"},{\"name\":\"固定队-副井下口北门\",\"indexCode\":\"405d6a2b86be48649ed142bb18ecf08f\"},{\"name\":\"运输区-2号暗斜井650防跑车装置\",\"indexCode\":\"79c3da4181ae4408a277948866895ce6\"},{\"name\":\"固定队-主井尾绳\",\"indexCode\":\"697986d6befe47bea0a18ecd626eb6b7\"},{\"name\":\"副井沉淀池\",\"indexCode\":\"6818735178dd4faeb925e785ee1adc5f\"},{\"name\":\"副井南门绕道车场\",\"indexCode\":\"3e892b02df844fe1b05e486b9ddd1dc3\"},{\"name\":\"450副井井口北侧\",\"indexCode\":\"b8063fdfc99d4992ad02662a5cf62804\"},{\"name\":\"运输区-550 1号斜井上口\",\"indexCode\":\"23159518aa25451da8c4f1d905f9028c\"},{\"name\":\"运输区-550 2号斜井上口\",\"indexCode\":\"65e6107180d84b67b43504ac82944709\"},{\"name\":\"固定队-1#暗斜井机电硐室\",\"indexCode\":\"4064609f810b4399ab508eb4c91fc86e\"},{\"name\":\"2#暗斜井机电硐室\",\"indexCode\":\"e549f16cdf0342ae9f85bb4d78d650e8\"},{\"name\":\"2#暗斜井车房\",\"indexCode\":\"7f0e2146d86c4d6c92fc13b129433410\"},{\"name\":\"1#暗斜井车房\",\"indexCode\":\"9c389ba0a85442fea8b0e4bb67818cde\"},{\"name\":\"风井安全出口\",\"indexCode\":\"9f2b23266c8945679622ca1daedaa955\"},{\"name\":\"主井B101皮带\",\"indexCode\":\"52275e2890a24aea9789ff506065c641\"},{\"name\":\"550m1号斜井车场入口\",\"indexCode\":\"4f732f3490de40b4be6381656866e76a\"},{\"name\":\"主井上口\",\"indexCode\":\"22e2261276574f34aeac8753087f9425\"},{\"name\":\"750车场2号斜井车场\",\"indexCode\":\"fbf51fd34d1344e5bb2fd360affea446\"},{\"name\":\"主井A101皮带\",\"indexCode\":\"719033fd822c4fd49ce648e54feebfdc\"},{\"name\":\"750车场1号斜井车场\",\"indexCode\":\"e40c1935908543b4b8f580aecde399ae\"},{\"name\":\"2号斜井750防跑车装置\",\"indexCode\":\"58d6a12acd254554b8f4bf3b80c149d8\"},{\"name\":\"运输区1号斜井750防跑车\",\"indexCode\":\"6f804990c9cc474b905ce33dc6b974b7\"},{\"name\":\"2#暗斜井-550防跑车装置\",\"indexCode\":\"570ee679703d4e0ea856ef53f5a3047f\"},{\"name\":\"650m2号斜井车场外口\",\"indexCode\":\"3c24899e12694202a65a185d30337106\"},{\"name\":\"运输区-5502#暗斜井车场摘挂钩处\",\"indexCode\":\"2f7ef28be3f54292bfb4e106f0763357\"},{\"name\":\"550 2号斜井入口\",\"indexCode\":\"d36cea44b4424648ab78262b52e6ef26\"},{\"name\":\"6502#斜井车场挂钩处\",\"indexCode\":\"838631ab6a7c476896ae55399472f7a8\"},{\"name\":\"550m2号暗斜井上口\",\"indexCode\":\"6efc1b80a7e84cca8ce9a22b5dac6d4c\"},{\"name\":\"1号斜井550上口挂钩处\",\"indexCode\":\"e673ba2d967a480aaa809e986d2c8775\"},{\"name\":\"1号斜井650防跑偏装置\",\"indexCode\":\"8a65e1a0a9d340b1a309c658c1c9529f\"},{\"name\":\"650 1号斜井外口\",\"indexCode\":\"18745f67df464d98bea18dcd89bc75f5\"},{\"name\":\"1号暗斜井550防跑偏装置\",\"indexCode\":\"7ffa7ec5aa4c4633a6c1135297521c9c\"},{\"name\":\"550井下中央变电所2_Y\",\"indexCode\":\"4f6b499ca9514b44940fc72a5d663b27\"},{\"name\":\"新集二矿-固定队-主井二楼对门\",\"indexCode\":\"d4ce5e661f5745b0b50f2862c4d2bca5\"},{\"name\":\"新集二矿-固定队-副井低压室\",\"indexCode\":\"c50ef3ced02342a49943e7e41174da0d\"},{\"name\":\"新集二矿-固定队-副井低压室2\",\"indexCode\":\"78fa1b31b0b04037b59629dda46cca38\"},{\"name\":\"新集二矿-固定队-主井车房配电室北\",\"indexCode\":\"cabc104f10cf49929f1aee9b01e75e41\"},{\"name\":\"新集二矿-固定队-主井车房一楼\",\"indexCode\":\"f0b0b96affa84acd8238bc953e2b3c58\"},{\"name\":\"新集二矿-固定队-主井车房配电室\",\"indexCode\":\"7f70c01c06404e5292a17ec63c3bb357\"},{\"name\":\"新集二矿-固定队-副井高压室南\",\"indexCode\":\"37afc55263cc4674957d6e2ed80a2182\"},{\"name\":\"新集二矿-固定队-副井电控室\",\"indexCode\":\"023377269930498692d253d889449524\"},{\"name\":\"新集二矿-固定队-副井电控室北\",\"indexCode\":\"b1f2916fac0642c89a7f4caa6d884089\"},{\"name\":\"新集二矿-固定队-副井车房门口\",\"indexCode\":\"31385efeac594f52acfb9a85da0aca0d\"},{\"name\":\"新集二矿-固定队-副井高压室\",\"indexCode\":\"1d8499ff105a4df1a15b9f9d59f990e9\"},{\"name\":\"新集二矿-井口小食堂向北路段\",\"indexCode\":\"f2ee26a96d514640950e25a5af409a40\"},{\"name\":\"新集二矿-主井机工组向北\",\"indexCode\":\"76ae5034b179411aa37dd0338d0afbd7\"},{\"name\":\"新集二矿-副井车房西侧向南铁道口\",\"indexCode\":\"aad817265558459b9c19f1a0fd1c2e29\"},{\"name\":\"新集二矿-落矸石场地(主井南)\",\"indexCode\":\"42a61aeb5b164a82954d49ce51feec35\"},{\"name\":\"新集二矿-副井车房西侧向北铁道口\",\"indexCode\":\"f214e0dfa5264f96a0a9666b6d7a2b54\"},{\"name\":\"新集二矿-生产办-副井炸药卸载\",\"indexCode\":\"64d0ee6deaa14299ab9c9b50128364f2\"},{\"name\":\"生产办-副井上口火工品转运点\",\"indexCode\":\"b03bccb2b37a46bba2782389de13b585\"},{\"name\":\"新集二矿-固定队-主井车房配电室2\",\"indexCode\":\"b743c88d7a2c45729429709ff69419af\"},{\"name\":\"固定队主井机电队\",\"indexCode\":\"ccec5e14b73d4026ae07ffebbbd5389c\"},{\"name\":\"保卫科-主井场地北\",\"indexCode\":\"35250ada620b44cb9cd71c3fcff1181c\"},{\"name\":\"运输区-井口升井虹膜考勤机处\",\"indexCode\":\"45068b6de51f471880947caa837de5f7\"},{\"name\":\"副井重车线\",\"indexCode\":\"018993f117cf42028d026f182868f08b\"},{\"name\":\"新集二矿-固定队-副井车房\",\"indexCode\":\"34042100001319109938\"},{\"name\":\"新集二矿-固定队-副井沉淀池\",\"indexCode\":\"34042100001319109939\"},{\"name\":\"新集二矿-运输区-副井上口二平台\",\"indexCode\":\"34042100001319109942\"},{\"name\":\"新集二矿-运输区-副井下口北门\",\"indexCode\":\"34042100001319109943\"},{\"name\":\"新集二矿-运输区-副井下口二平台\",\"indexCode\":\"34042100001319109944\"},{\"name\":\"运输区-550m2号暗斜井车场摘挂钩处\",\"indexCode\":\"34042100001319109911\"},{\"name\":\"新集二矿-固定队-主井井口\",\"indexCode\":\"34042100001319109915\"},{\"name\":\"新集二矿-固定队-主井下口装载皮带尾\",\"indexCode\":\"34042100001319109917\"},{\"name\":\"新集二矿-固定队-主井卸载admin123_\",\"indexCode\":\"34042100001319109918\"},{\"name\":\"新集二矿-固定队1号斜井绞车房出入口\",\"indexCode\":\"34042100001319109919\"},{\"name\":\"新集二矿-固定队2号斜井车房\",\"indexCode\":\"34042100001319109920\"},{\"name\":\"新集二矿-固定队2号斜井车房机电硐室出入口\",\"indexCode\":\"34042100001319109921\"},{\"name\":\"新集二矿-固定队主井下口装载皮带头\",\"indexCode\":\"34042100001319109922\"},{\"name\":\"新集二矿-运输区-1号暗斜井550防跑车装置\",\"indexCode\":\"34042100001319109923\"},{\"name\":\"新集二矿-运输区-1号斜井550上口挂钩处\",\"indexCode\":\"34042100001319109924\"},{\"name\":\"新集二矿-运输区-1号斜井750防跑车\",\"indexCode\":\"34042100001319109925\"},{\"name\":\"新集二矿-运输区-2号暗斜井550防跑车装置\",\"indexCode\":\"34042100001319109926\"},{\"name\":\"新集二矿-运输区-2号斜井750防跑车装置\",\"indexCode\":\"34042100001319109927\"},{\"name\":\"新集二矿-运输区-650m2号斜井车场挂钩处\",\"indexCode\":\"34042100001319109928\"},{\"name\":\"新集二矿-运输区-750车场1号斜井车场\",\"indexCode\":\"34042100001319109929\"},{\"name\":\"新集二矿-运输区-副井等候室东侧\",\"indexCode\":\"34042100001319010034\"},{\"name\":\"新集二矿-运输区-井口升井虹膜考勤机处\",\"indexCode\":\"34042100001319010037\"},{\"name\":\"新集二矿-风井安全出口\",\"indexCode\":\"34042100001319010136\"},{\"name\":\"新集二矿-主井B101皮带\",\"indexCode\":\"34042100001319010137\"},{\"name\":\"新集二矿-固定队-主井下天轮\",\"indexCode\":\"34042100001319109961\"},{\"name\":\"新集二矿-固定队-主井南勾尾绳\",\"indexCode\":\"34042100001319109960\"},{\"name\":\"新集二矿-固定队-主井北勾尾绳\",\"indexCode\":\"34042100001319109959\"},{\"name\":\"新集二矿-固定队-主井上天轮\",\"indexCode\":\"34042100001319109916\"},{\"name\":\"新集二矿-固定队-副井滚筒\",\"indexCode\":\"34042100001319009980\"},{\"name\":\"新集二矿-固定队-副井下天轮\",\"indexCode\":\"34042100001319009982\"},{\"name\":\"新集二矿-固定队-副井上天轮\",\"indexCode\":\"34042100001319109914\"},{\"name\":\"新集二矿-固定队-主井励磁变\",\"indexCode\":\"34042100001319009994\"},{\"name\":\"新集二矿-固定队-副井机工班组建设\",\"indexCode\":\"34042100001319009981\"},{\"name\":\"新集二矿-固定队-主井高压室\",\"indexCode\":\"34042100001319009992\"},{\"name\":\"新集二矿-固定队-主井操作室\",\"indexCode\":\"34042100001319009989\"},{\"name\":\"新集二矿-固定队-主井电控室\",\"indexCode\":\"34042100001319009991\"},{\"name\":\"新集二矿-固定队-主井低压室\",\"indexCode\":\"34042100001319009990\"},{\"name\":\"新集二矿-固定队-主井机工组\",\"indexCode\":\"34042100001319010080\"},{\"name\":\"新集二矿-保卫科-井口茶水房\",\"indexCode\":\"34042100001319009942\"}]}";
        List<HashMap<String, String>> res = analysisStrJson(json);

        return CommonResponse.ok(res);
    }
}
